
import CAvatar from '@/tsx/CAvatar';
import messages from '@intlify/vite-plugin-vue-i18n/messages';
import ElementPlus from 'element-plus'
console.log(ElementPlus)
import 'element-plus/dist/index.css'
import 'element-plus/es/components/message-box/style/css';
import 'element-plus/es/components/message/style/css';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import { createI18n } from 'vue-i18n';
import VueLayoutPage from 'vue-layout-page';
import App from './App.vue';
import router from './router';
import store from './store/index';
// @ts-ignore
import Avue from '@smallwei/avue';
import '@smallwei/avue/lib/index.css';
import TencentCloudChat from '@tencentcloud/chat';
import chat from "@/api/chat";
import eventBus from 'vue3-eventbus'
const app = createApp(App);
const i18n = createI18n({
  locale: 'zh-cn',
  fallbackLocale: 'zh-cn',
  messages
});
app.use(router);
app.use(eventBus)
app.config.globalProperties.$chat = chat.create()
app.use(store);
app.use(i18n);
app.use(ElementPlus);
app.use(Avue);
//@ts-ignore
app.use(VueLayoutPage);
//@ts-ignore
app.component('CAvatar', CAvatar);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
app.mount('#app');
